if (!jsx3.lang.Class.forName("tibco.admin.environments.togeLoanInfo.TogeLoanInfoPlugin")) {

/**
 * Define <code>tibco.envPlug.environments.envPlug</code> class
 * This is a sample class definition of <code>tibco.admin.environments.EnvironmentsInterface</code>
 */
jsx3.Class.defineClass(
		"tibco.admin.environments.togeLoanInfo.TogeLoanInfoPlugin",
		jsx3.lang.Object,
		[tibco.admin.environments.EnvironmentsInterface],
		function (plugin) {
			/**
			 * This used for save the exclusive object of current class.
			 */
			plugin.entityID = null;
			plugin.nodeId = null;
			plugin.nodeName = null;
			plugin.instance = null;
			plugin.type = null;
			plugin.prototype.mainObject = null;

			/**
			 * This method used for constructing a exclusive object.
			 */
			plugin.getInstance = function(args) {
				tibco.admin.Main.loadResources("tibco/admin/environments/togeLoanInfo/ui/togeLoanInfo.xml", "tibco.admin");				
				tibco.admin.Main.loadResource("tibco/admin/environments/togeLoanInfo/jss/jss.xml", "tibco.admin", "jss56M", "ljss", false);
				if(!this.instance) {
					// TODO: change the class constructor as you defined in above 'defineClass' sentence.
					this.instance = new tibco.admin.environments.togeLoanInfo.TogeLoanInfoPlugin();
				}
				return this.instance;
			}

			/**
			 * This method used for give the namespace of current component.
			 * If you give a wrong namespace, resolve the path of file will failed. 
			 */
			plugin.prototype.getNamespace = function() {
			   return "tibco.admin";
			}

			/**
			 * This method used for give the label text which display inside tabbed button.
			 */
			plugin.prototype.getButtonText = function() {
				return tibco.admin.Main.getServer().getDynamicProperty("@@togeLoanInfo_56D");
			}

			plugin.prototype.getComponentPath = function() {
				return  "tibco/admin/environments/togeLoanInfo/component.xml";
			}

			plugin.prototype.getComponentUIPath = function() {
				return  "tibco/admin/environments/togeLoanInfo/ui/togeLoanInfo.xml";
			}

			/**
			 * This method will be automaticly called by pluginContainer. As same as the event of <code>onInitialized</code>.
			 * So, you can put the code of initialization inside this method.
			 * And, carefully that this 'initPlugin' event happened when this class file loaded.
			 */
			plugin.prototype.initPlugin = function() {
			}

			/**
			 * This method will be automaticly called by pluginContainer.
			 * Happened when plug-in container display the plug-in User Interface.
			 * And, carefully that this 'loadComponent' event will happen when display the UI.
			 */
			plugin.prototype.loadComponent = function(parent) {
				var me = this;
				tibco.admin.Main.loadUIResourceAsync(parent, this.getNamespace(), this.getComponentUIPath(), me, me.componentLoaded);
			}

			plugin.prototype.componentLoaded = function(objEvent) {
				if (objEvent.status == "SUCCESS") {
					this.mainObject = objEvent.obj;
					this.mainObject.pluginObj = this;
					this.mainObject.loadDetails(this.type, this.nodeId, this.nodeName);
				}
				else {
					if (objEvent.exception)
					{
						tibco.admin.Main.logException(objEvent.exception, objEvent.message);
					}
					else {
						jsx3.log(objEvent.message);
					}
				}
			}

			/**
			 * This method will automaticly called by container.
			 * But right now, I didn't see any callback with this method.
			 */
			plugin.prototype.destroyPlugin = function() {
				
			}

			/**
			 * This method will automaticly called by container.
			 * But right now, I didn't see any callback with this method.
			 */
			plugin.prototype.onAfterComponentUnloaded = function() {
				this.envId = null;
				this.nodeId = null;
				this.nodeName = null;
				this.mainObject = null;
				this.type = null;
			}

			/**
			 * Must be implement by plug-in class.
			 * Because 'EnvironmentsInterface' has defined this as a abstract method.
			 */
			plugin.prototype.setEnvId = function(id) {
			}

			/**
			 * Must be implement by plug-in class.
			 * Because 'EnvironmentsInterface' has defined this as a abstract method.
			 */
			plugin.prototype.setNodeIds = function(arrIds) {
				if(this.isInEditMode()) {
					return;
				}
                if(arrIds && (arrIds.length == 1)) {
                    this.nodeId = arrIds[0];
                }
                else {
                    this.nodeId = null;
                }
				if(this.mainObject) {
					this.mainObject.loadDetails(this.envId, this.nodeId, this.nodeName);
				}
			}

			plugin.prototype.setNodeName = function(strName) {
				this.nodeName = strName;
				if(this.mainObject) {
					this.mainObject.loadDetails(this.envId, this.nodeId, this.nodeName);
				}
			}

			plugin.prototype.buttonSelected = function() {
				if(!this.isInEditMode()) {
					this.mainObject.loadDetails(this.envId, this.nodeId, this.nodeName);
				}
			}
				
			plugin.prototype.setPageType = function(type) {
				this.type = type;
				if(this.mainObject) {
					this.mainObject.loadDetails(this.type, this.nodeId, this.nodeName);
				}
			}
			

		});
}